package com.scu.qingshi.infrastructure.event;

import com.google.common.eventbus.EventBus;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author qingshi
 */
@Component
public class EventBusCenter {

    final EventBus eventBus = new EventBus();;

    public void register(Object listener){
        eventBus.register(listener);
    }

    public void postEvent(Object event){
        eventBus.post(event);
    }

}
